<?php

namespace App\Admin\Actions\Post;

use App\Model\Moment;
use Encore\Admin\Actions\BatchAction;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;

class MomentVerfyBad extends BatchAction
{
    public $name = '审核不通过';
    public function handle(Collection $collection, Request $request)
    {
        foreach ($collection as $model) {
            $ret = Moment::veryfyBad($model);
            Log::info(__CLASS__ . "==MomentId:{$model->id}==Ret:{$ret}");
        }
        return $this->response()->success('审核不通过')->refresh();
    }

    public function dialog()
    {
        $this->confirm('确认审核不通过？');
    }
}
